import 'dart:convert';

import 'package:enterprise_v6_app/app/data/common/tree_node_child_bean.dart';
import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/organization_role_entity.g.dart';
export 'package:enterprise_v6_app/generated/json/organization_role_entity.g.dart';

/// 敏捷应急-组织架构树-节点下人员
@JsonSerializable()
class OrganizationRoleEntity implements TreeNodeChildBean {
  OrganizationRoleEntity();

  factory OrganizationRoleEntity.fromJson(Map<String, dynamic> json) => $OrganizationRoleEntityFromJson(json);
  late String companyCode = '';
  late String createBy = '';
  late String createById = '';
  late String createDate = '';
  late String deleted = '';
  late String emergencyPhone = '';
  late String emergencyRole = '';
  late String emergencyUserId = '';
  late String id = '';
  late String userName = '';
  late String organizationId = '';
  late String updateBy = '';
  late String updateById = '';
  late String updateDate = '';

  /// 是否选中
  @override
  late bool isSelected = false;

  Map<String, dynamic> toJson() => $OrganizationRoleEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }

  @override
  String getId() {
    return id;
  }

  @override
  String getShowName() {
    return userName;
  }

  @override
  String getShowRole() {
    return emergencyRole;
  }

  @override
  String getShowPhone() {
    return emergencyPhone;
  }
}
